<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="cn">
<head>
    <meta charset="UTF-8">
    <title>信息提示页面</title>
</head>
<body style="background-color: rgb(245,250,254);">
<section>
    <div style="height: 550px;">
        <!--/*@thymesVar id="info" type=""*/-->
        <!--/*@thymesVar id="time" type=""*/-->
        <h2 style="text-align:center">[[${info}]] 页面在<span id="second" style="color:red">[[${time }]]</span>秒后自动跳转</h2>
        <div style="text-align:center">
            <!--/*@thymesVar id="location" type=""*/-->
            <a th:href="${#request.contextPath}+${location}">如果没有跳转，请点击我哦！</a>
        </div>
        <br><br><br><br><br><br>
    </div>
    <div style="text-align: center;color: gray;">
        <footer class="footer">
            Copyright &copy;2019 江苏省苏州高博优智开发工作室|版权所有 盗版必究.
        </footer>
    </div>
</section>
<script type="text/javascript">
    var interval = null;
    window.onload = function () {
        interval = setInterval(goTime, 1000);
    };
    var time = [[${time}]];

    function goTime() {
        time--;
        if (time > 0) {
            document.getElementById("second").innerHTML = time;
        } else {
            clearInterval(interval);
            var str= '[[${#httpServletRequest.getContextPath()}]][[${location}]]'.split("amp;");
            var loat = "";
            for (var i in str ) {
                loat += str[i];
            }
            location.href = loat;
        }
    }
</script>
</body>
</html>
